//
//  YAYISearchBar.m
//  YAYIDoctor
//
//  Created by hxp on 16/5/4.
//  Copyright © 2016年 hxp. All rights reserved.
//

#import "YAYISearchBar.h"

@implementation YAYISearchBar
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    for (UIView *view in [self subviews] ) {
        
        for (UIView *viw in view.subviews) {
            if ([viw isKindOfClass:[UITextField class]]) {
                UITextField *textField = (UITextField *)viw;
                textField.frame = CGRectMake(10, 10, SCREEN_width -20, 36);
                textField.layer.borderWidth = 1;
                textField.layer.borderColor = [UIColor lightGrayColor].CGColor;
                textField.layer.cornerRadius = 5;
                textField.clipsToBounds = YES;
            }
            
        }
    }

}
@end
